package com.qfedu.meidijiaju.controller;


import com.qfedu.meidijiaju.common.ResponseData;
import com.qfedu.meidijiaju.entity.FaxiantieziYxy;
import com.qfedu.meidijiaju.entity.QuanzitypeYxy;
import com.qfedu.meidijiaju.service.QuanzitypeYxyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 圈子类型 前端控制器
 * </p>
 *
 * @author meidimeiju
 * @since 2022-10-03
 */
@Api(tags = "圈子相关模块")
@RestController
@RequestMapping("/meidijiaju/quanzitype-yxy")
public class QuanzitypeYxyController {

    @Autowired
    private QuanzitypeYxyService quanzitypeYxyService;

    @ApiOperation(value = "/选择圈子")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "huaTiName",value = "模糊话题名字",paramType = "query",dataType = "string")
//    })
    @RequestMapping(value = "/allQuanzitype",method = RequestMethod.GET)
    public ResponseData<List<QuanzitypeYxy>> allQuanzitype(){

        return quanzitypeYxyService.allQuanzitype();

    }

    @ApiOperation(value = "/根据圈子id查询不同圈子的内容")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "quanziId",value = "圈子类型id 1 2 3 4 5",paramType = "query",dataType = "int")
    })
    @RequestMapping(value = "/findTieZiByQuanZiId",method = RequestMethod.GET)
    public ResponseData<List<FaxiantieziYxy>> findTieZiByQuanZiId(int quanziId){

        return quanzitypeYxyService.findTieZiByQuanZiId(quanziId);
    }

}

